Show AllShow All

EOMONTH

See Also

Returns the serial number for the last day of the month that is the indicated number of months before or after start_date. Use EOMONTH to calculate maturity dates or due dates that fall on the last day of the month.

If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.

ShowHow?

Syntax

EOMONTH(start_date,months)

Start_date    is a date that represents the starting date. Dates should be entered by using the DATE function, or as results of other formulas or functions. For example, use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered as text.

Months    is the number of months before or after start_date. A positive value for months yields a future date; a negative value yields a past date.

Remarks

Example

The example may be easier to understand if you copy it to a blank worksheet.

ShowHow?

 
1
2
A
Date
01/01/2008
Formula Description (Result)
=EOMONTH(A2,1) Date of the last day of the month, one month after the date above (February 29, 2008)
=EOMONTH(A2,-3) Date of the last day of the month, three months before the date above (October 31, 2007)

Note  To view the number as a date, select the cell and click Cells on the Format menu. Click the Number tab, and then click Date in the Category box.